package indi.woniu.controller;

import indi.woniu.entity.Pool;
import indi.woniu.entity.ResponseEntity;
import indi.woniu.service.MyPoolService;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author venture
 */
@CrossOrigin
@RestController
@RequestMapping("/myPool")
public class MyPoolController {
    @Autowired
    private MyPoolService myPoolService;

    @RequestMapping("/findPool")
    public ResponseEntity findPool(){
        List<Pool> poolList = myPoolService.findPool();

        return new ResponseEntity(200,"成功",poolList);
    }
}
